# -*-conding:utf-8-*-

"""

 Created by feiwo at 2018/7/29
 
"""
from sqlalchemy import Integer, Column, String, Text, SmallInteger, Boolean

from app.models.Base import Base

__author__ = 'feiwo'


class User(Base):

    __tablename__ = 'user'

    userName = Column(String(64), nullable=False, name='username')
    nickName = Column(String(128), nullable=True, name='nickname')
    passwordHash = Column(String(128), nullable=False, name="password_hash")
    accessToken = Column(String(255), name="access_token")
    avatar = Column(String(255))
    intro = Column(Text())
    email = Column(String(64))
    type = Column(SmallInteger(), default=2, comment='1 admin 2 normal')
    active = Column(Boolean(), default=True)
